package models;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

import play.db.jpa.Model;

@Entity
public class Aluno extends Model {
	
	@Column(unique=true)
	public String numMatricula;	
	@Column(nullable=false)
	public TipoDeAluno tipoDeAluno;
	public boolean ativo;

	@OneToOne(cascade=CascadeType.ALL, optional=false)
	public Pessoa pessoa;

	@OneToMany(mappedBy="aluno")
	public List<Matricula> matriculas;	
}
